<?php

namespace api\controller;

use common\controller\VerifyController;
use common\service\DelayOrderTaskService;
use think\Request;
use think\Response;

/**
 * 延期单控制层
 */
class DelayOrderTaskController extends VerifyController
{

    private DelayOrderTaskService $delayOrderTaskService;

    public function __construct()
    {
        parent::__construct();
        $this->delayOrderTaskService = DelayOrderTaskService::getInstance();
    }

    /**
     * 延期单列表数据
     * @param \think\Request $request
     * @return Response
     */
    public function getDelayOrderTaskList(Request $request): Response
    {
        $param = $request->param()['param'];
        $page = get_default_page($param) ?? [1,50];
        $filter = $param['filter'] ?? [];
        $userId = $request->getUserId();
        $res = $this->delayOrderTaskService->getDelayOrderTaskList($filter, $page, $userId);
        return json(success_response('select success', $res));
    }



}
